<?php

namespace Base\GoogleMapBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class DefaultController extends Controller
{

    public function indexAction()
    {
        $map = $this->get('ivory_google_map.map');
        $marker = $this->get('ivory_google_map.marker');
        $infoWindow = $this->get('ivory_google_map.info_window');

        $marker->setInfoWindow($infoWindow);
        $map->addMarker($marker);

        /* Breadcrumbs */
        $breadcrumbs = $this->get( 'white_october_breadcrumbs' );
        $breadcrumbs->addItem( 'Accueil', $this->get("router")->generate( '_homepage' ));
        $breadcrumbs->addItem( 'Nous trouver' );

        return $this->render('BaseGoogleMapBundle:Default:index.html.twig', array('map' => $map));
    }
}
